package com.fengling.contronller;

import com.fengling.Pojo.User;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class Controller {
    @RequestMapping("/cnm888")
    public String request(User user) {
        System.out.println(user);
        return "ok";


    }

    @RequestMapping("/cnm999")
    public String requestJson(@RequestBody User user) {
        System.out.println(user);
        return "ok";
    }

    @RequestMapping("/cnmpath/{id}/{name}")
    public String requestPath(@PathVariable Integer id,@PathVariable String name) {
        System.out.println(id+":"+name);
        return "ok";
    }


}
